//
//  LQBaseViewController.m
//  LQBaseKit
//
//  Created by 戴志朋 on 15/9/23.
//  Copyright © 2015年 hzdracom. All rights reserved.
//

#import "LQBaseViewController.h"
#import <UtilsMacro.h>

@interface LQBaseViewController ()

@end

@implementation LQBaseViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self defaultConfig];
    [self setupView];
    [self setupData];
    [self bindingData];
}

- (void)defaultConfig{
    self.edgesForExtendedLayout = UIRectEdgeNone;
    self.navigationController.navigationBar.translucent = NO;
    self.tabBarController.tabBar.translucent = NO;
    [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];
    self.view.backgroundColor = [UIColor whiteColor];
}

- (void)setupView{
    NSAssert(NO, @"please override setupView method");
}

- (void)setupData{
    NSAssert(NO, @"please override setupData method");
}

- (void)bindingData{
    NSAssert(NO, @"please override bindingData method");
}

/**
 *  @author Jeffrey, 15-05-30 14:05:27
 *
 *  当应用中某一个控制器需要旋转，请重写以下三个方法
 *
 *  @return
 */
-(BOOL)shouldAutorotate{
    return NO;
}

-(UIInterfaceOrientationMask)supportedInterfaceOrientations{
    return UIInterfaceOrientationMaskPortrait;
}

-(UIInterfaceOrientation)preferredInterfaceOrientationForPresentation{
    return UIInterfaceOrientationPortrait;
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
}

-(void)dealloc{
    LQLog(@" dealloc controller : %@",self.class);
}

@end